package com.xm.xmapp.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.xm.xmapp.R;
import com.xm.xmapp.base.BaseFragment;
import com.xm.xmapp.myinterface.MainInterFaceAble;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by LDW on 2017/7/20.
 */
public class MainBottomFragment extends BaseFragment {
    MainInterFaceAble mMainInterFaceAble;
    @Bind(R.id.iv_persion)
    ImageView ivPersion;
    @Bind(R.id.iv_loaction)
    ImageView ivLoaction;
    @Bind(R.id.iv_msg)
    ImageView ivMsg;

    public void setmMainInterFaceAble(MainInterFaceAble mMainInterFaceAble) {
        this.mMainInterFaceAble = mMainInterFaceAble;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_mainbottom, null, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.iv_persion, R.id.iv_loaction, R.id.iv_msg})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_persion:
                break;
            case R.id.iv_loaction:
                mMainInterFaceAble.uIChange(MainInterFaceAble.GET_LOCTION,null);
                break;
            case R.id.iv_msg:
                break;
        }
    }
}
